#include <iostream>
using namespace std;
class A{
public:
    ~A(){
        cout<<"~A"<<endl;
    }
};
class C{
public:
    ~C(){
        cout<<"~C"<<endl;
    }
};
class B{
public:
    ~B(){
        cout<<"~B"<<endl;
    }
};
class D{
public:
    ~D(){
        cout<<"~D"<<endl;
    }
};

C c;
int main()
{
    A *pa=new A();
    B b;
    static D d;
    delete pa;
    return 0;
}

